package cn.tedu.qxhouserent.house.pojo.param;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@Accessors(chain = true)
@TableName("user_house_appoint")
public class UserHouseAppointParam implements Serializable {
    private Long userId;
    @NotNull(message = "必须提交房屋id")
    @ApiModelProperty(value = "房屋id",required = true)
    private Long houseId;
    @NotNull(message = "必须提交看房时间")
    @ApiModelProperty(value = "看房时间",required = true)
    private String dateTime;
    @NotNull(message = "必须提交手机号")
    @Pattern(regexp = "^1[3456789]\\d{9}$",
            message = "手机号格式不正确")
    @ApiModelProperty(value = "手机号",required = true)
    private String phone;
    @NotNull(message = "必须提交用户姓名")
    @Pattern(regexp = "(^[\\u4e00-\\u9fa5]{2,}(?:·[\\u4e00-\\u9fa5]{2,})*$|^[\\u4e00-\\u9fa5]{2,}$)",
            message = "姓名不合法")
    @ApiModelProperty(value = "用户姓名",required = true)
    private String name;

}
